from src.llm_compiler.constants import END_OF_PLAN, JOINNER_FINISH

PLANNER_PROMPT = (
    "Question: Find a movie similar to Mission Impossible, The Silence of the Lambs, American Beauty, Star Wars Episode IV - A New Hope\n"
    "Options:\n"
    "Austin Powers International Man of Mystery\n"
    "Alesha Popvich and Tugarin the Dragon\n"
    "In Cold Blood\n"
    "Rosetta\n"
    "Thought: I need to find all movies in the Question.\n"
    '1. search("Mission Impossible")\n'
    '2. search("The Silence of the Lambs")\n'
    '3. search("American Beauty")\n'
    '4. search("Star Wars Episode IV - A New Hope")\n'
    "Thought: I need to find all movies in the Options.\n"
    "5. search(Austin Powers International Man of Mystery)\n"
    "6. search(Alesha Popvich and Tugarin the Dragon)\n"
    "7. search(In Cold Blood)\n"
    "8. search(Rosetta)\n"
    "Thought: I can answer the question now.\n"
    f"9. join(){END_OF_PLAN}\n"
)

OUTPUT_PROMPT = (
    "Solve a question answering task with interleaving Observation, Thought, and Action steps. "
    "Answer should always be a single item and MUST not be multiple choices.\n"
    "You will be given a question and some Wikipedia passages, which are the observations.\n\n"
    "Thought step can reason about the observations in 1-2 sentences, and Action can be only one type:\n"
    f" (1) {JOINNER_FINISH}(answer): returns the answer and finishes the task. "
    "Answer should be short and a single item and MUST not be multiple choices.\n"
    "\nGuidelines:\n"
    f"  - You MUST always output with {JOINNER_FINISH}(answer) even if you are not sure about the answer.\n"
    "   - You MUST Find all movies to make the most informed decision.\n"
    "   - The Observation for some movies may not be available or not relevant to movie information. "
    "If this happens, just ignore it and rely on your own knowledge on that movie.\n"
    "   - When making the final answer, you MUST use both your own knowledge and the information you found. "
    "Information is only there to help you make a better and informed decision.\n"
    "\n"
    "Here are some examples: \n"
    "\n"
    "Question: Find a movie similar to Mission Impossible, The Silence of the Lambs, American Beauty, Star Wars Episode IV - A New Hope\n"
    "Options:\n"
    "Austin Powers International Man of Mystery\n"
    "Alesha Popvich and Tugarin the Dragon\n"
    "In Cold Blood\n"
    "Rosetta\n"
    "\n"
    "search(Mission Impossible)\n"
    """Observation: Mission: Impossible is an American multimedia franchise based on a fictional secret espionage agency known as the Impossible Missions Force (IMF). The 1966 TV series ran for seven seasons and was revived in 1988 for two seasons. It inspired a series of theatrical motion pictures starring Tom Cruise beginning in 1996. By 2011, the franchise generated over $4 billion in revenue making Mission: Impossible one of the highest-grossing media franchises of all time.[1] As of 2023, the latest media released in the franchise was the action-spy film Mission: Impossible – Dead Reckoning Part One, which premiered in Rome on July 12, 2023.. Main pageContentsCurrent eventsRandom articleAbout WikipediaContact usDonate.\n"""
    "search(The Silence of the Lambs)\n"
    """Observation: Could not find [The Silence of the Lambs]. Similar: ['The Silence of the Lambs (film)', 'The Silence of the Lambs (novel)', 'Buffalo Bill (character) (redirect from Buffalo Bill (The Silence of the Lambs))', 'The Silence of the Lambs', 'Hannibal (2001 film) (category Films about the Federal Bureau of Investigation)'].\n"""
    "search(American Beauty)\n"
    """Observation: Could not find [American Beauty]. Similar: ['American Beauty (1999 film)', 'American Beauty', 'American Beauty (album)', 'American Beauty/American Psycho', 'American Beauty (soundtrack)'].\n"""
    "search(Star Wars Episode IV - A New Hope)\n"
    """Observation: Star Wars (retroactively retitled Star Wars: Episode IV - A New Hope) is a 1977 American epic space opera film written and directed by George Lucas, produced by Lucasfilm and distributed by 20th Century-Fox. It was the first film released in the Star Wars film series and the fourth chronological chapter of the "Skywalker Saga". Set "a long time ago" in a fictional universe where the galaxy is ruled by the tyrannical Galactic Empire, the story focuses on a group of freedom fighters known as the Rebel Alliance, who aim to destroy the Empire's newest weapon, the Death Star. When Rebel leader Princess Leia is apprehended by the Empire, Luke Skywalker acquires stolen architectural plans of the Death Star and sets out to rescue her while learning the ways of a metaphysical power known as "the Force" from Jedi Master Obi-Wan Kenobi. The cast includes Mark Hamill, Harrison Ford, Carrie Fisher, Peter Cushing, Alec Guinness, David Prowse, James Earl Jones, Anthony Daniels, Kenny Baker, and Peter Mayhew.\n"""
    "search(Austin Powers International Man of Mystery)\n"
    """Observation: Austin Powers: International Man of Mystery (or simply Austin Powers[2]) is a 1997 American spy comedy film directed by Jay Roach. It is the first installment in the Austin Powers series. It stars franchise co-producer and writer Mike Myers, playing the roles of Austin Powers and Dr. Evil,[5][6] Powers' arch-enemy. Supporting roles are played by Elizabeth Hurley, Robert Wagner, Seth Green, and Michael York.\n"""
    "search(Alesha Popvich and Tugarin the Dragon)\n"
    """Observation: Could not find Alesha Popovich and Tugarin the Dragon. Similar: ['Alyosha Popovich', 'The Three Bogatyrs', 'List of fantasy films of the 2000s'].\n"""
    "search(In Cold Blood)\n"
    """Observation: In Cold Blood is a non-fiction novel[1] by American author Truman Capote, first published in 1966. It details the 1959 murders of four members of the Clutter family in the small farming community of Holcomb, Kansas.. Capote learned of the quadruple murder before the killers were captured, and he traveled to Kansas to write about the crime. He was accompanied by his childhood friend and fellow author Harper Lee, and they interviewed residents and investigators assigned to the case and took thousands of pages of notes. Killers Richard Hickock and Perry Smith were arrested six weeks after the murders and later executed by the state of Kansas.\n"""
    "search(Rosetta)\n"
    """Observation: Observation: Rosetta (/roʊˈzɛtə/ roh-ZET-ə)[a] or Rashid (Arabic: رشيد, romanized: Rašīd, IPA: [ɾɑˈʃiːd]; Coptic: ϯⲣⲁϣⲓⲧ, romanized: ti-Rashit)[b] is a port city of the Nile Delta, 65 km (40 mi) east of Alexandria, in Egypt's Beheira governorate. The Rosetta Stone was discovered there in 1799.. Founded around the 9th century on site of the ancient town Bolbitine, Rosetta boomed with the decline of Alexandria following the Ottoman conquest of Egypt in 1517, only to wane in importance after Alexandria's revival. During the 19th century, it was a popular British tourist destination, known for its Ottoman mansions, citrus groves and relative cleanliness.. The name of the town most likely comes from an Arabic name Rašīd (meaning "guide")[3] and was transcribed and corrupted in numerous ways – the name Rexi was used by the Crusaders in Middle Ages[4] and Rosetta or Rosette ("little rose" in Italian and French respectively) was used by the French at the time of Napoleon Bonaparte's campaign in Egypt.\n"""
    "Thought: Based on my own knowledge and the provided observations, Austin Powers International Man of Mystery is most similar.\n"
    f"Action: {JOINNER_FINISH}(Austin Powers International Man of Mystery)\n"
    "###\n"
    "\n"
)
